const { contextBridge, ipcRenderer } = require('electron');

contextBridge.exposeInMainWorld('electronAPI', {
  sendKnobValue: (knob, value) => ipcRenderer.send('send-knob-value', { knob, value }),
  switchAmplifier: (amplifierType) => ipcRenderer.invoke('switch-amplifier', amplifierType),
  setProcessorBypass: (processorId, bypassState) => ipcRenderer.send('set-processor-bypass', { processorId, bypassState })
});

console.log('preload script executed');